package com.campus.counseling.model.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.campus.counseling.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    List<String> selectUserRoles(@Param("userId") Long userId);

    Long selectRoleIdByRoleKey(@Param("roleKey") String roleKey);

    List<Long> selectUserIdsByRoleKey(@Param("roleKey") String roleKey);

    void deleteUserRoles(@Param("userId") Long userId);

    void insertUserRole(@Param("userId") Long userId, @Param("roleId") Long roleId);
}